package org.example.service.impl;

import org.example.domain.entity.Goods;
import org.example.domain.model.Result;
import org.example.mapper.GoodsMapper;
import org.example.service.IGoodsService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodsServiceImpl implements IGoodsService {
    private GoodsMapper goodsMapper;

    public GoodsServiceImpl(GoodsMapper goodsMapper) {
        this.goodsMapper = goodsMapper;
    }

    @Override
    public Result selectGoods() {
        List<Goods> goods = goodsMapper.selectGoods();
        return Result.buildSuccess(goods);
    }
}
